 

import request from '@/router/axios'

export function fetchList(query) {
  return request({
    url: '/subwayst/swtkticketdelivery/page',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/subwayst/swtkticketdelivery',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/subwayst/swtkticketdelivery/' + id,
    method: 'get'
  })
}

export function delObj(id) {
  return request({
    url: '/subwayst/swtkticketdelivery/' + id,
    method: 'delete'
  })
}

export function putObj(obj) {
  return request({
    url: '/subwayst/swtkticketdelivery',
    method: 'put',
    data: obj
  })
}



export function getDetailObj(id) {
  return request({
    url: '/subwayst/swtkticketdelivery/getDetailById/' + id,
    method: 'get'
  })
}

export function getHandDetailObj(id) {
  return request({
    url: '/stm/swsttickethand/getDetailById/' + id,
    method: 'get'
  })
}


export function complain(obj) {
  return request({
    url: '/subwayst/swtkticketdelivery/complain',
    method: 'post',
    data: obj
  })
}

export function inform(obj) {
  return request({
    url: '/subwayst/swtkticketdelivery/inform',
    method: 'post',
    data: obj
  })
}

export function exportExcel(query) {
  return request({
    url: '/subwayst/swtkticketdelivery/export',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
/**
 * 车票配送信息模板下载
 * @param {*} query 
 * @returns 
 */
 export function templateDelivery(query) {
  return request({
    url: "/subwayst/swtkticketdelivery/exportTamplateDelivery",
    method: 'get',
    responseType: 'blob',
    params: query
  })
}
/**
 * 车票配送信息导入
 * @param body
 */
 export function ImportDelivery(body) {
  return request({
    url: "/subwayst/swtkticketdelivery/ImportDelivery",
    headers: { "Content-Type": "multipart/form-data" },
    method: "post",
    data: body
  });
}

export function inputDetailSubmit(ids) {
  return request({
    url: 'subwayst/swtkticketdelivery/inputDetailSubmit',
    method: 'put',
    data: ids
  })
}
export function outputDetailSubmit(ids) {
  return request({
    url: 'subwayst/swtkticketdelivery/outputDetailSubmit',
    method: 'put',
    data: ids
  })
}


